package com.yuandian.api.management.feign;

import com.yuandian.api.business_monitor.po.SearchParams;
import com.yuandian.api.customer_perception.po.OperatorOverviewParams;
import com.yuandian.api.customer_perception.vo.SearchOptionVo;
import com.yuandian.bpm.common.core.constant.SecurityConstants;
import com.yuandian.bpm.common.core.util.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * 说明：远程调用选项接口服务
 * @Author zfsn
 * @Date 2023/3/14 16:06
 */
@FeignClient(contextId = "RemoteBusinessHallService", value = "bpm-management")
public interface RemoteBusinessHallService {
	/**
	 * 指定地区下的营业厅
	 * @param searchParams 主键
	 * @return 通用返回对象
	 */
	@PostMapping("/businessHall/getBusinessHall")
	R<List<Map<String, String>>> getBusinessHall(SearchParams searchParams);

	/**
	 * 查询营业厅信息并装换成 Map<营业厅编码， 营业厅名称>
	 *
	 * @param searchParams 业务编码集合
	 * @return 搜索选项vo对象集合
	 */
	@PostMapping("/businessHall/getBusinessHallMap")
	R<Map<String, String>> getBusinessHallMap(SearchParams searchParams);
	@PostMapping("/innerInterface/getBusinessHallMap")
	R<Map<String, String>> getBusinessHallMapInner(SearchParams searchParams, @RequestHeader(SecurityConstants.FROM) String from);


	/**
	 * 根据营业厅名称列表获取营业厅Id列表
	 *
	 * @param businessHallName
	 * @return 搜索选项vo对象集合
	 */
	@GetMapping("/businessHall/getBusinessHallIdListByHallNameList")
	R<List<String>> getBusinessHallIdListByHallNameList(@RequestParam("businessHallName") String businessHallName);

	@GetMapping("/innerInterface/getBusinessHallIdListByHallNameList")
	R<List<String>> getBusinessHallIdListByHallNameList(@RequestParam("businessHallName") String businessHallName, @RequestHeader(SecurityConstants.FROM) String from);

	@PostMapping("/businessHall/queryBusinessHall")
	R<List<SearchOptionVo>> queryBusinessHall(@RequestBody OperatorOverviewParams params);

	/**
	 * 根据营业厅编码查询营业厅名
	 * @return
	 */
	@GetMapping("/businessHall/queryBusinessHallNameById")
	R<String> queryBusinessHallNameById(@RequestParam("businessHallId") String businessHallId);
}
